package com.education.business.service.system;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.education.business.mapper.SystemRoleMenuMapper;
import com.education.business.service.BaseService;
import com.education.model.entity.SystemRoleMenu;
import org.springframework.stereotype.Service;

/**
 * @author 余一
 * @date 2021/9/30  12:43
 */
@Service
public class SystemRoleMenuService extends BaseService<SystemRoleMenuMapper, SystemRoleMenu> {


    public int deleteByRoleId(Integer id) {
        LambdaQueryWrapper<SystemRoleMenu> wrapper = Wrappers.lambdaQuery(SystemRoleMenu.class)
                .eq(SystemRoleMenu::getRoleId, id);
        return baseMapper.delete(wrapper);
    }
}
